
<template>
  <div class="zhif">
    <span class="text">鸿包惠支付</span>
      <sh-keyboard
        class="keyboard"
        v-model="value"
        inter="6"
        decimal="2"
        placeholder="请输入支付金额"
        label="输入金额度"></sh-keyboard>
    <el-button class="btns" type="primary" @click="pay">支付</el-button>
  </div>

</template>
<script>

  export default {
    name: 'toPay',
    data () {
      return {
        value: '',
        shop: '',
        openid: ''
      }
    },
    methods: {
      pay: function () {
        if (this.shop)
          window.location.href = 'http://hbh.dev.whbpkj.com/wechat/welfare/pay/'+this.shop+'/'+this.value+'?openid='+this.openid
      }
    },
    created(){
      this.shop = localStorage.getItem('shop');
      this.openid = localStorage.getItem('openid');
    }
  }
</script>
<style scoped>
.zhif{
  margin-top: 20px;
  padding:0 .3rem;
}
.text{
  font-size: .4rem; 
  display: block;
  line-height: .8rem;
}
  .btns{
    display: table;
    margin:30px auto;
    width:130px;
  }
  </style> 
  
